﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Xml.Serialization;

namespace UML_Creator.Model
{
    [Serializable]
    [XmlInclude(typeof(FullLineEdge))]
    public class Edge : NotifyBase
    {
        private Diagram diagramA;
        private Diagram diagramB;

        public Diagram EndA { get { return diagramA; } set { diagramA = value; NotifyPropertyChanged("EndA"); } }
        public Diagram EndB { get { return diagramB; } set { diagramB = value; NotifyPropertyChanged("EndB"); } }

        private string colour;
        public string Colour { get { return colour; } set { colour = value; NotifyPropertyChanged("Colour"); } }

        private double opacity;
        public double Opacity { get { return opacity; } set { opacity = value; NotifyPropertyChanged("Opacity"); } }

        private Point endAsPoint;
        public Point EndAsPoint { get { return endAsPoint; } set { endAsPoint = new Point(diagramB.X, diagramB.Y); } }
        public Edge()
        {
            Opacity = 1.0;
            Colour = "Black";
        }
    }
}
